<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex 布局模板</title>
    <style>
        /* 父容器样式区域 */
        .container {
            width: 500px;
            /* vh 是视口单位，1vh = 视口高度的1%           */
            height: 100vh;
            background-color: palevioletred;
            padding-top: 10px;
            box-sizing: border-box;
            /* 弹性布局 */
            display: flex;
            /* 基于父元素区域,超出换行 */
            flex-wrap: wrap;

        }

        .container div {
            width: 100px;
            height: 100px;
            background: #4CAF50;
            color: white;
            padding: 20px;
            border: 1px solid black;
            /* 两端对齐 */
            justify-content: space-between;
            /* 均分对齐 */
            /* justify-content: space-evenly; */




        }
    </style>
</head>

<body>
    <div class="container">
        <div>项目1</div>
        <div>项目2</div>
        <div>项目3</div>
        <div>项目4</div>
        <div>项目5</div>
        <div>项目6</div>
        <div>项目7</div>
        <div>项目8</div>
        <div>项目9</div>
        <div>项目10</div>
        <div>项目11</div>


    </div>
</body>

</html>